package com.zhuiyun.educations.api.member.mapper;

import com.zhuiyun.educations.api.member.entity.Member;
import com.zhuiyun.educations.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @ClassName MemberVoMapper
 * @Description TODO 会员类型管理
 * @Author ys
 * @Date 2023/6/16 8:28
 **/
public interface MemberMapper extends BaseMapper<Member> {
    /**
     * @Author ys
     * @Description TODO 逻辑删除
     * @Date 2023/6/26 14:09
     * @Return CommonResult
     * @param
     */
    @Update("update member set del_flag=1 where id=#{id}")
    int deleteMemberById(int id);
    /**
     * @Author ys
     * @Description TODO 批量逻辑删除
     * @Date 2023/6/26 14:09
     * @Return CommonResult
     * @param
     */
    @Update("<script>update member set del_flag=1 where id IN <foreach collection='ids' item='id'  open='(' separator=',' close=')'>#{id}</foreach></script>")
    Integer deleteMemberByIds(@Param("ids") List<String> ids);
}
